package com.jsh.erp.datasource.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jsh.erp.datasource.entities.TodoTask;
import com.jsh.erp.datasource.vo.TodoTaskVo4List;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TodoTaskMapper extends BaseMapper<TodoTask>{
    int insert(TodoTask record);

    List<TodoTaskVo4List> findAllList(
            @Param("offset") int offset,
            @Param("rows") int rows,
            @Param("userId") Long userId,
            @Param("taskType") String taskType,
            @Param("status") String status,
            @Param("creator") Long creator
    );

    Long findAllListByCount(
            @Param("userId") Long userId,
            @Param("taskType") String taskType,
            @Param("status") String status,
            @Param("creator") Long creator
    );

    int updateStatus(@Param("status") String status, @Param("id") Long id, @Param("defaultNumber") String defaultNumber);

    int update666(TodoTask todoTask);
}